SpeedHack log - Eric Love - dates are Fri 12th to Mon 15th August

1:16pm Thu
Well it's 32h until SpeedHack begins and once again I'm very excited and can't wait for it to start. This will be my seventh SpeedHack-like competition. Nick Majcen, who lives nearby, will draw the graphics and I'll do the programming. Nick is a more accomplished artist than others I've worked with in SpeedHacks, and the 250kB contraint is likely to come into play this time. For this reason I've looked into the use of optimised palettes. We'll probably start in high-colour, but if we're coming in too heavy, I'll do a bit of work to reduce it down. We'll see if that sends us into any file handling difficulties, handling bmps of various colour depth, different datafile verions, etc.

Of my previous six entries, four of them (PacHack, Tomb Robber, Madd Race and Legoland Adventures) used a tile engine which seems to keep returning, as its always easy to implement. With it comes an editor which gets improved every time, and this time I might try to make it easy to use, and we might be able to get a few people creating content on Tuesday.

Of the other two entries, Icecream Van was simply a mod of the Allegro demo game (as per the rules) and Cubed used a simple 3D engine (as per the rules). So it seems like any time the rules don't dictate the shape of the game, I revert to the tile engine.

I don't have too many other things to do in the weekend, so there should be time to make it a good one. It'll be important to get the engine made quickly and have the editor working by Sunday afternoon, but experience suggests this is unlikely.

11:36pm Thu
I've downloaded the latest version of AngelScript (C++ syntax scripting system) and am refamiliarising myself with it. It doesn't have an easy build sequence, and the code takes up a bit too much space, so AngelScript might not be a good option.

1:46pm Fri
Matthew mentioned in the forums that it would be a good idea to be ready to run with a network library, but not essential. Someone who submitted a multi-player rule deduced that that rule may have been picked. I also put in a similar rule, so looks like multi-player might happen. Alternatively, it may be a case where we have to have some online action, like Troll Hunter (a TINS winner) which downloaded webpages. In fact that would be a good way to make a game in the three days and put levels on my website later which the game could use. I checked Troll Hunter's code and it doesn't look too hard to pull stuff off the www with LibCurl, although that would still take time, and this PC isn't internet-ready. If the the networking hint is for a multiplayer rule, I won't be able to to that online; indeed when I suggested multiplayer I was thinking two players on the one machine.

Just 7h to go and I can't wait to see the rules and get going!

12:19am Sat
I went to Nick's place to see the rules come up. It's a fairly good set of rules and I am already looking forward to playing a few dozen games in the next month.

The rules didn't really dictate the style of game much, so re naturally reverted to a platform game - this way I can start with Legoland Adventures (from TINS) and work from there. There engine won't be new, but nearly everything else will be.

Genre: Survival. That can be the case with any game (where you "die") but we'll put in a few levels where you have to survive a certain time - like level 2 of Cubed.
World Map: That was the best rule - I love world maps in games! We had a couple of ideas. Firstly, the typical top-down map showing the locations you're coming up to. Secondly, (inspired by Relentless) the globe! We were thinking of doing both but we'll only do the latter, because we'll be pressed for time.
Classic stuff: This makes it a bit like the Back2Hack, except we don't have to spend half our time rolling our own primitives. Elias and I were the only entrants in the Back2Hack 3 years ago. We can fulfill all three of these (some sections with only 6 shades, all sections lo-res) and if the objective of the game is to find the special glasses, this can explain the single-hue palette.
Act of IP: We won't even try that.
Dichotomy: We're not really sure what to do there. I'm going to ask what other people are doing for a dichotomy. If we had thought more about dichotomies to begin with, we might have ended up with a game idea with more flesh on it.

So the plan is a basic platformer set in six locations:
Adelaide, Australia - where we live
Rome, Italy - Colloseum and Catacombs
Giza, Egypt - Pyramids
Great Wall of China
somewhere in Columbia - mountains and a street
somewhere in Antartica - slippery areas and a building

With only 16 colours it's easy to draw in MSPaint - with more colours, Paint can't be trusted to use the colour numbers you want. Time to write a ToDo list.

12:50am Sat
Here's some of the things which must be done today:
Find the hackery to make Allegro work on Nick's PC
Lots of work to remove all Legoland specific code
Reduce tile size to 16x16
Create player at correct size
Change game to 256 colours
Change player physics to use acceleration
Lion, Man, Rat
Throwing stone - killing rat
Timer which counts down - success when it counts to 0.

There's probably more than that, and there's todos for Sun and Mon as well. But we'll worry about one day at a time. Nick has a whole lot of things to draw. If nothing goes wrong we might finish it, but there is still the question of what will be fun to play.

1:24am Sat
I thought I would have gone to bed by now, but I think I'll go as long as I can tonight. I'm now in the process of pulling the Lego code out and making the game run without it. It's hard going. And why is there a big delay on startup??

2:35am Sat
I downloaded a cool map of the world which I'll use wrapped around a globe. In the absence of a dichotomy, I'll try to say something dichotomous about every country visited. 

I've found a bug in the grabber. Press Shift-PgDn when you're already at the bottom of the list. Arrivaderci!

2:54am Sat
After tonight's hackery, the program once again compiles and runs. The annoying pause is gone (load_datafile was taking a while converting bmps) and now I can go to bed. I have an imposible task in the morning.

9:43am Sat
Up again, and another dichotomy I thought of is hot/cold, where in Egypt you die if you're exposed to the heat too much (without water?) and in Antartica you die if you're out in the cold too long.

10:39am Sat
For the first time, I've got variable jumping working. The coefficients still need tweaking. I've been making everything work in 16 colours and lo-res. One challenge will be making the graphics in such a way that thr grabber knows what all the bitmaps are.

11:23am Sat
The colours are sorted out and on startup, we go through all the bmps in the datafile and resize them to remove the cyan border. That way all sprites can be grabbed by a 32x32 grid, but Nick can specify the correct size by drawingthe border.

12:07pm Sat
Now horizontal velocity works by acceleration as well. This means we have the option of slippery tiles for Antartica.

12:21pm Sat
Here's the ToDo for the next four hours:
Set up menu to play any level
success conditions
Lion, Man, Rat
Throwing stone - killing rat
Timer which counts down - success when it counts to 0.

1:55pm Sat
I've done all the easy todos. Today was always going to be the day I expected too much of myself, and I will probably fall short. But the great thing is that so far there have been no major holdups. It's quite common for one hour of a 'hack to be spent on one annoying bug. Otoh, we're only 16h in.

3:11pm Sat
Now I'm trying to get an enemy moving sensibly, so that it doesn't fall down a hole, nor stand in the same spot changing direction.

3:46pm Sat
We have enemies of two varieties. Now I'll try to implement slippery tiles, which may come into play in Antarctica or Columbia. There are often page faults when I start, but the debug version has no trouble. Not my favourite kind of bug.

3:53pm Sat
Found the last bug. I really must be careful to check for null pointers. I have to go to work at 6 so I'll see Nick between 5 & 6. He's done some drawing, don't know how much.

4:18pm Sat
Slippery tiles are done. You can accelerate through the air but not as much as on non-slippery ground. What else needs to be done this afternoon? Throwing rocks, and tiles which give way if you stand on them too long. I haven't done exposure, Great Wall watchmen, or a boss (unlikely).

5:28pm Sat
I missed a possible window of time for Nick & I to catch up, so we'll see if I can make platforms which give way.

7:52pm Sat
I was only needed at work for an hour, now I've got enough of a game working for the first day. I'm still not compiling on Nick's PC, but I might be able to shortly.

10:43pm Sat
With one day done and two left, we planned the next part of our effort. He hopes to do the important graphics tonight so that I can pull it together tomorrow. He suggested we could show waving flags of the different countries visited. We've got six flags ready to wave, so I'll pull in the code from Legoland for that. It's slightly worrying that my programs have crashed on Nick's PC.

Tomorrow at around 8pm might be the next time we meet up. At that time the game needs to be fully functional, as does the editor. There's a lot of work to be done on the editor (which I was tempted to do on Thursday, but I'm using enough pre-Friday code) to make it usable. If some of Nick's friends are able to design levels, there's a lot of potential for Monday.

11:50pm Sat
It's a long time since I've used Allegro's (or any) GUI routines and I'm trying to make a menu bar which sits at the top.

1:28am Sun
Tonight has been very unproductive. I should have gone to bed two hours ago. The main thing holding me up has been the menubar. I can draw a menubar but I can't get it to react the right way when I click it. The next thing to do is plan how I am going to redo the interface for the editor. Nick will let me know when he finished the tile and character graphics tonight, hopefully when I am asleep.

2:21am Sun
Nick sent me what he did tonight. The sprites are good, but I was hoping for more in the tiles department. Otoh, it's only when you've been editing levels that you decide what tiles you want. SpeedHacks offer no such luxury. You gotta make what you need first time!

I'm finally having some luck with the menu bar, after being about to ask someone on IRC. I'm too tired; I'll have to leave it there. By the time I get up, have of the 72h will be gone.

1:10pm Sun
That's the longest break I'll have in the 72h - I slept, went to church, and delivered pizza to the uni where I studied last decade. This afternoon's task is getting the project to the point where Nick and anyone else can make levels without my help. The main part of that will be the editor, but there are other things worth putting in the game as well. Easily enough for me to spend all day.

3:07pm Sun
Well, now the menu bar is working, but I can't do anything that isn't on it! There's got to be a way to do this.

4:26pm Sun
I still haven't fixed the GUI issues. I've brought in all the sprites (including some from Tomb Robber). Julian (the main character) looks nice except we walks funny. The lion is good although it's too small.

5:46pm Sun
Well, I've given up on getting the menu bars to work. At least in the process I've somewhat improved the editor. The Colombian flag was coming out in the wrong colours for a long time, but now the flags are waving nicely.

8:24pm Sun
Finally the editor is doing most of what it ought to, although the mouse pointer is off-kilter. I've put a pause function in (a necessity which often gets omitted in a rush). I was supposed to have gone to Nick with lots of things done, but the glasses, the improvements on enemies, birds, etc have not happened. I'm still looking forward to the fun of the world map tomorrow, but I fear that our six countries will all be fairly boring, though the view on the ride will be impressive.

10:41pm Sun
I called up Steve, the only other active Allegro.cc member I know of in Adelaide. He's got some time free tomorrow and will hopefully draw up a few levels, suggest fixes and maybe add suggestions on randomness and dichotomies.

I went to Nick's place and we worked out our plan for the last day. Seventeen levels seems like a pretty hard task, but we should at least be able to make enough to string together in a sort of game. I have to get the rest of the content working by tomorrow morning so Nick can use everything available.

This weekend is an England v Australia cricket match, played every night our time. The tiresome dominance of our boys is coming to an end, with England looking like winning this game, unless it rains. Speaking of which, there was a warning about a storm here, which would be bad news - I'm not allowed to leave the computers on during a thunderstorm.

Keeping this log takes a bit of time; I wonder how much further I'd be without this. But I like reading the logs of other developers, so I continue to type this one up.

11:15pm Sun
I've made the glasses, which was the easiest of tonights todos. There's a number of enemies which all need fixing. Including the bird, which I haven't made at all.

12:04am Mon
Now you can pick up rocks and throw them, and the editor's bug count has been decremented.

12:55am Mon
The men are now walking intelligently. When they hit a wall or they they see the ground in front running out, they turn around. Time to do the same for the lions!

1:16am Mon
Rats and lions are now running around. The unpredictablilty of the lion's jump is a bit of a worry. The rat was hovering above the ground before I revoked its exemprion from the law of gravity.

2:01am Mon
I've got the guards who sit on the Great Wall of China, throwing stuff down on you at random.

2:20am Mon
Getting very tired now. I'm trying to make the birds work.

3:07am Mon
The birds are wild and unpredictable, but that will have to do. 18 hours to go, and I need to sleep for some of those.

3:48am Mon
I've made a few other changes, including blocks which can be destroyed by a rock. Each little feature seems to take so long that I wonder how long the grand plans for tomorrow will take.

4:18am Mon
I can't believe I've stayed up this long! I'm really tired now, I wonder how much I'll sleep.

8:56am Mon
It's 12h to go, which is just as well, with the lack of sleep taking its toll on my health. This morning I converted the world map to 16 colours, now trying to make it display as a globe. With the bitmap saved as 1024x512, the globe zips down to 86kB. Is this use of space warranted?

9:03am Mon
Of all my typing errors, "paly" for "play" must be among my most commmon.

9:25am Mon
OK, the globe now looks like a sphere, but it seems to have the same thing on every face. This should soon be fixed as well.

9:50am Mon
I was giving it the wrong texture! That's fixed, but now it seems to be wrong at the seam (Date Line). Correcting the value of pi didn't help, it'll have to be something else.

10:18am Mon
Mondo in mezzo! That's the only way to describe what I'm seeing now. I'm using quaternions to rotate the globe, but not all the right parts are showing.

10:27am Mon
The international date line is still an ugly seam. I thought it was looking through accidently, but there's just ugly marks there.

10:32am Mon
I think I've worked it out - when it comes to draw the last bit, it doesn't wrap around the texture. Instead of drawing New Zealand it reiterated the first 349 of the world. Can this be fixed?

2:49pm Mon
The globe is excellent. Unfortunately I haven't spent enough time doing other stuff. Time to go and see Nick again.

4:07pm Mon
Now the levels can be played in order. I've brought some music in, and suddenly the zip is up to 239kB. How did midis get so big? Five hours to go and no levels made properly. This is a worry.

4:32pm Mon
In the spirit of the rules, I'm trying to exactly match the controller with the keyboard. This won't be trivial for the menu system though.

4:57pm Mon
I had planned to do fancy palette effects - something I learnt to do nine years ago. But all we'll get is the glasses.

5:23pm Mon
Fading is working. Number of lives stuff is working. I got an idea as to how I could implenent a Password-Continue feature. Might not be enough time.

5:59pm Mon
I love using the ? : operators. They don't always love me back, and if I don'tuse lots of brackets, it all goes awry. Now the whole game uses one set of controls.

6:04pm Mon
NEVER try to rotate around a zero axis. The whole world will disappear.

7:12pm Mon
I'm putting in a text writing function. From here on it will be too busy to update. This log will include a post-mortem which I'll write tomorrow.


